import React, { Component } from 'react';
import creditRisk from './creditRisk';
import opWarning from './opWarning';
import marketRisk from './marketRisk';
import opinionRisk from './opinionRisk';
import { connect } from 'dva';
import { BrowserRouter as Router, Route, NavLink, Redirect } from 'react-router-dom';
import router from 'umi/router';
import styles from './Warning.less';

class Warning extends Component {
  constructor(props) {
    super(props);
  }

  componentDidMount() {
    router.push('/Warning/creditRisk');
  }

  componentWillUnmount() {}

  render() {
    return (
      <div className={styles.page}>
        <ul className={[styles.commonMenuLevel2, styles.clearfix].join(' ')}>
          <li>
            <NavLink activeClassName={styles.actNav} to="/Warning/creditRisk">
              信披风险
            </NavLink>
          </li>
          <li>
            <NavLink activeClassName={styles.actNav} to="/Warning/opWarning">
              经营预警
            </NavLink>
          </li>
          <li>
            <NavLink activeClassName={styles.actNav} to="/Warning/marketRisk">
              市值预警
            </NavLink>
          </li>
          <li>
            <NavLink activeClassName={styles.actNav} to="/Warning/opinionRisk">
              舆情预警
            </NavLink>
          </li>
        </ul>
        <Route path="/Warning/creditRisk" component={creditRisk} />
        <Route path="/Warning/opWarning" component={opWarning} />
        <Route path="/Warning/marketRisk" component={marketRisk} />
        <Route path="/Warning/opinionRisk" component={opinionRisk} />
      </div>
    );
  }
}

export default Warning;
